package com.tau.iplayer.client;

import java.util.List;
import java.util.Map;

import com.google.gwt.user.client.rpc.AsyncCallback;
import com.tau.iplayer.client.models.Playlist;
import com.tau.iplayer.client.models.Track;
import com.tau.iplayer.client.models.TrackTransaction;

public interface DataStoreServiceAsync {
	
	void addTrack(String userID, Track track, Playlist playlist, AsyncCallback<Void> callback);

	void getPlaylists(String userID, AsyncCallback<Map<String, Playlist>> callback);

	void addPlaylist(String userID, Playlist playlist, AsyncCallback<Void> callback);

	void getTracks(String userID, Playlist playlist, AsyncCallback<List<Track>> callback);

	void deleteTrack(String userID, Track track, AsyncCallback<Void> callback);

	void updateTrack(String userID, Track newTrack, AsyncCallback<Void> callback);

	void moveTrack(String userID, Track track, Playlist newPlaylist,
			AsyncCallback<Void> callback);

	void renamePlaylist(String userID, Playlist playlist, String name, AsyncCallback<Void> callback);

	void deletePlaylist(String userID, Playlist playlist, AsyncCallback<Void> callback);

	void getTracks(List<String> userIDs, AsyncCallback<List<Track>> callback);

	void getAllTracks(AsyncCallback<List<Track>> callback);

	void storeTrackTransaction(TrackTransaction transaction,
			AsyncCallback<Void> callback);

	void getTrackTransactions(String receiverID,
			AsyncCallback<List<TrackTransaction>> callback);

	void deleteTrackTransaction(String userID, TrackTransaction transaction,
			AsyncCallback<Void> callback);
}
